#include "Direction.h"


Direction::~Direction()
{
}


Direction::Direction(const Direction & d)
{
	xDir = d.getXDir();
	yDir = d.getYDir();
	zDir = d.getZDir();
	hAngle = d.getHAngle();
	vAngle = d.getVAngle();
}


Direction& Direction::operator=(const Direction& d)
{
	if (this != &d)
	{
		this->setXDir(d.getXDir());
		this->setYDir(d.getYDir());
		this->setZdir(d.getZDir());
		this->setHAngle(d.getHAngle());
		this->setVAngle(d.getVAngle());
	}
	
	return *this;
}


//accessors

void Direction::print() const
{
	cout << "X: " << xDir << " Y: " << yDir << " Z: " << zDir << endl;
	cout << "Horizontal: " << hAngle << " Vertical: " << vAngle << endl;
}


//mutators


void Direction::horizontalRotation(int degrees)
{
	hAngle += degrees;
	hAngle = (hAngle % 360);
//	xDir = sin(hAngle * M_PI / 180);
//	yDir = cos(hAngle * M_PI / 180);
}